package cn.laixueit.controller;

import cn.laixueit.pojo.User;
import cn.laixueit.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller
@Scope("prototype")
public class UserController {

    @Autowired
    @Qualifier("userService2")
    private UserService userService;

    @Value("张然")
    private String name;


    public void save(){
        User user = new User();
        user.setName(name);
        userService.save(user);
    }





}
